#region Copyright Jonathan Quiros

//	
// All rights are reserved. Reproduction or transmission in whole or in 
// part, in any form or by any means, electronic, mechanical or otherwise, 
// is prohibited without the prior written consent of the copyright owner.
//
// Filename: IGamersRepository.cs
//

#endregion

using System.Collections.Generic;
using Ids.Web.Listing;
using Novagoal.Models;
using Novagoal.Models.Utils;

namespace Novagoal.Repositories
{
    public interface IGamesRepository
    {
        List<Game> GetGames(Dictionary<GameListFilter, string> filterList, GameListSortField sortField,
                            SortDirectionType sortDirection, int currentPage, int pageSize);

        int GetTotalGames(Dictionary<GameListFilter, string> filterList);

        IEnumerable<Game> GetUpcomingGamesByTournament(int tournamentId);

        IEnumerable<Game> GetFinishedGamesByTournament(int tournamentId);

        Result GetResultByPerson(int gameId, int personId);
        
        void SaveResult(int gameId, Result result);

        void DeleteResult(int gameId, int updatedBy);
        
        Game GetGame(int gameId);
        
        List<Player> GetPlayersByTeam(int teamId);
        
        int AddGame(Game game);
        
        int EditGame(Game game);
        
        IEnumerable<Person> GetPeopleWithResult(int gameId);
        
        void UpdatePoints(Result result, Game game, Person person);
        
        void CloseGame(int gameId);
        
        List<Game> GetGamesByTeam(int teamId);
    }
}